<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<% String path = request.getContextPath(); request.setCharacterEncoding("UTF-8");
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">   
<head>
<base href="<%=basePath%>">
<title>车捷保保单查询</title>
<jsp:include page="/WEB-INF/jsp/common/common.jsp"></jsp:include>	
<link href="css/calendar.css"  rel="stylesheet" type="text/css" >
<link rel="stylesheet" href="<%=path%>/css/zTreeStyle/zTreeStyle.css">
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.excheck-3.5.js"></script>
<script src="<%=path%>/js/jquery.divbox.js" type="text/javascript"></script>
<style type="text/css">
.sub-title {
    background: none repeat scroll 0 0 #ffffff;
    font-size: 100%;
    font-weight: bold;
    height: 30px;
    line-height: 30px;
    text-indent: 10px;
    width: 100%;
}
</style>
	<script language="javascript" type="text/javascript">
		var defaultBranch;//保存默认机构的值
		$(document).ready(function() {
			isReadyIframe();
			
			loadPrivilegeBranchSelect();//加载机构下拉框
				
		});
		
		function isReadyIframe(){
			var iframe = $(window.parent.document).find("#iframe").length;
			if(iframe==0){
				window.location.href="<%=basePath%>index.jsp";
			}
		}
		
		//加载机构下拉框
		function loadPrivilegeBranchSelect(){
			$.ajax({
					url : "<%=path%>/protocolPolicyList/queryPrivilegeBranch?"+new Date().getTime(),
					type : 'POST',
					async : false,
					dataType:'json',
					success : function(result) {
						if(result){
							if($.validate(result))return;

							//接口下拉框对象
							var privilegeBranchSelect = document.getElementById("privilegeBranch");
							privilegeBranchSelect.length=0;
							
							var data = result.data;
							if(data.length > 0){
								defaultBranch = data[0].deptCode;
									
								for (var i = 0; i < data.length; i++) {
									var option = new Option();
									option.text = data[i].deptCname;
									option.title = data[i].deptCname;
									option.value = data[i].deptCode;
									privilegeBranchSelect.add(option);
								}
							}
						}
					}
				});
		 }
		
		//所选机构改变时，清空相关联数据
		function clearBranchRelaField(){
			$("#dptCode").val("");
			$("#partnerNo").val("");
// 			$("#subPartnerNo").val("");
		}
		
		//------------------------------------------ 出单机构 开始----------------------------------------------
		//打开出单机构窗口
		function openDeptDiv(pageIndex,obj){
			
			if($.trim($('#privilegeBranch').val()).length == 0){
				$.message("error", "请先选择机构");
				return;
			}
			
			$('#deptCode').val('');
			$('#deptCname').val('');
			$("#"+obj.id).blur();
			queryCoreDept(pageIndex);
		}

		//查询出单机构
		function queryCoreDept(pageIndex){
			var size = 8;
			var deptCode = $.trim($('#deptCode').val());
			var deptCname = $.trim($('#deptCname').val());
			var parentDeptCode =  $.trim($('#privilegeBranch').val());
			
			$.openLoading();
			$.ajax({
				url : "<%=path%>/protocolPolicyList/queryDeptByDeptAndParentDeptCode",
				type : 'POST',
				async : true,
				data:{
					size:size,
					pageIndex:pageIndex,
					deptCode:deptCode,
					deptCname:deptCname,
					parentDeptCode:parentDeptCode
				},
				dataType:'json',
				success:function(page){
					$.closeLoading();
					if($.validate(page))return;
					
					var radioObj ="<input class='input_fxk' name='deptradio' type='radio' value=''>";
					var fieldNames = "deptCode,deptCNname";
					var tableContent = creatTable1(fieldNames,page,radioObj);
					var tableObj = $("#deptTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					
					var strPage = creatChannelPage3(pageIndex,6,page.maxPage,"18");
					var pageDIV = $("#deptPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
					
					$("#deptDiv").OpenDiv();
					
					bindradio();
				}
			});
		}

		//点击“确定” ，选择 出单机构
		function chooseDept(){
			var selectedDept= $("input[name='deptradio']:checked");
			if(selectedDept.length==0){
				$.message("error", "请选择一个出单机构");
				return;
			}
			var deptCode = selectedDept.parent().parent().children(" td:eq(1)").html();
			$('#dptCode').val(deptCode);
			
			closeCurrentDIV('deptDiv');
		}

		//------------------------------------------ 出单机构 结束----------------------------------------------
		
		//------------------------------------------ 合作伙伴 开始----------------------------------------------
		//打开合作伙伴 窗口
		function openChannelInfoDiv(pageIndex,obj){
			if(($.trim($('#privilegeBranch').val())).length==0){
				$.message('error',"请先选择机构");
				return;
			}
			$('#channelCode').val('');
			$('#channelName').val('');
			$("#"+obj.id).blur();
			queryTradPartners(pageIndex);
		}
		
		//查询 合作伙伴
		function queryTradPartners(pageIndex){
			var size = 8;
			var parentDeptCode = $.trim($('#privilegeBranch').val());
			var channelCode = $.trim($('#channelCode').val());
			var channelName = $.trim($('#channelName').val());
			
			$.openLoading();
			$.ajax({
				url : "<%=path%>/protocolPolicyList/queryChannelInfoOfLife",
				type : 'POST',
				async : true,
				data:{
					pageIndex:pageIndex,
					size:size,
					parentDeptCode:parentDeptCode,
					channelCode:channelCode,
					channelName:channelName
				},
				dataType:'json',
				success:function(page){
					$.closeLoading();
					if($.validate(page))return;
					
					var radioObj ="<input class='input_fxk' name='partnerradio' type='radio' value=''>";
					var fieldNames = "channelCode,channelName";
					var tableContent = creatTable1(fieldNames,page,radioObj);
					var tableObj = $("#channelInfoTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					
					var strPage = creatChannelPage2(pageIndex,6,page.maxPage,"16");
					var pageDIV = $("#channelInfoPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
					
					$('#channelInfoDiv').OpenDiv();
					
					bindradio();
				}
			});
		}
		
		//点击“确定”按钮，选择合作伙伴
		function choosePartner(){
			var selectedPartner = $("input[name='partnerradio']:checked");
			if(selectedPartner.length==0){
				$.message("error", "请选择一个合作伙伴");
				return;
			}
			var selectedPartnerNo = selectedPartner.parent().parent().children(" td:eq(1)").html();
			$('#partnerNo').val(selectedPartnerNo);
// 			$("#subPartnerNo").val("");
			
			closeCurrentDIV('channelInfoDiv');
		}
		
		//------------------------------------------ 合作伙伴 结束----------------------------------------------
		
		//------------------------------------------ 合作伙伴子机构 开始----------------------------------------------
		//加载subChannelTree
// 		function openSubChannelTreeDiv(){
// 			var partnerNo = $.trim($('#partnerNo').val());
// 			if(partnerNo.length==0){
// 				$.message("error", "请先选择合作伙伴");
// 				return;
// 			}
			
// 			$.openLoading();
// 			$.ajax({
<%-- 				url : "<%=path%>/lifePolicyList/querySubChannelTree?"+new Date().getTime(), --%>
// 				type : 'POST',
// 				async : true,
// 				data:{
// 					parentChannelCode:partnerNo
// 				},
// 				dataType:'json',
// 				success:function(data){
// 					$.closeLoading();
// 					if($.validate(data))return;
					
// 					if(data.length == 0){
// 						$.message("error", "所选合作伙伴下没有合作伙伴子机构");return;
// 					}
// 					var setting = {
// 							check: {
// 								enable: true,
// 								chkStyle: "radio",
// 								radioType: "all"
// 							},
// 							data: {
// 								simpleData: {
// 									enable: true
// 								}
// 							}
// 						};
	
// 					$.fn.zTree.init($("#subChannelTree"), setting, data);
					
// 					$("#subChannelTreeDiv").OpenDiv();
// 				}
// 			});
// 		}
		
// 		//点击“确定”按钮，选择合作伙伴子机构
// 		function chooseSubPartner(){
// 			var subChannelTree = $.fn.zTree.getZTreeObj("subChannelTree");
// 			if(subChannelTree.getCheckedNodes(true).length==0){
// 				$.message("error", "请选择一个合作伙伴子机构");
// 				return;
// 			}
// 			var subChannels = subChannelTree.getCheckedNodes(true);
// 			$("#subPartnerNo").val(subChannels[0].id);
			
// 			closeCurrentDIV('subChannelTreeDiv');
// 		}
		
		//------------------------------------------ 合作伙伴子机构 结束----------------------------------------------
		
		
		//点击“重置”查询条件
		function  resetCriteria(){
			
			$('#downloadlifePolicyFileForm input[type!="button"]').val("");
			$('#downloadlifePolicyFileForm select[name!="privilegeBranch"]').val("");
			$("#privilegeBranch").val(defaultBranch);//机构置为默认机构
		}
		function bindredio(){
			$("input[name='radioTradProdType']").click(function(){
				$("input[name='radioTradProdType']").parent().parent().removeClass("table_highlighter");
				$(this).parent().parent().addClass("table_highlighter");

		   	});
		}
		
		//点击“查询”
		function queryLifePolicy(pageIndex){
			var downloadFlag = false;
			if(pageIndex == null){
				pageIndex = 1;
			}
			if(pageIndex == -1){
				pageIndex = 1;
				downloadFlag = true;
			}
			
			var asyncFlag = true;
			if(pageIndex == -1){
				asyncFlag = false;
			}
			
			var privilegeBranch = $.trim($("#privilegeBranch").val());//机构
			var dptCode = $.trim($("#dptCode").val());//出单机构
			var tradProdType = $.trim($("#tradProdType").val());//产品类型
			var polno =$.trim($("#polno").val());//保单号
			var partnerNo = $.trim($("#partnerNo").val());//合作伙伴
			var polStatus =$.trim($("#polStatus").val());//保单状态
			var bbrName = $.trim($("#bbrName").val());//被保险人名称
			var polBeginDateBegin=  $.trim($("#polBeginDateBegin").val());//保单生效日期
			var polBeginDateEnd=  $.trim($("#polBeginDateEnd").val());
			
			
			
// 			var subPartnerNo= $.trim($("#subPartnerNo").val());//合作伙伴子机构
// 			var bbrCertiCode= $.trim($("#bbrCertiCode").val());//被保险人证件号
// 			var polSubDateBegin=  $.trim($("#polSubDateBegin").val());//保单提交日期
// 			var polSubDateEnd=  $.trim($("#polSubDateEnd").val());
			
			
			
			
			$.openLoading();
			$.ajax({
				url : "<%=path%>/protocolPolicyList/queryProtocolPolicyPageByCriteria",
				type : 'POST',
				async : asyncFlag,
				dataType:'json',
				data:{
					pageIndex:pageIndex,
					privilegeBranch:privilegeBranch,
					dptCde:dptCode,
					tradProdType:tradProdType,
					polno:polno,
					partnerNo:partnerNo,
					stateId:polStatus,
					bbrName:bbrName,
					polBeginDateBegin:polBeginDateBegin,
					polBeginDateEnd:polBeginDateEnd,
					size:10
					
// 					partnerSubCode:subPartnerNo,
// 					bbrCertiCode:bbrCertiCode,
// 					polSubDateBegin:polSubDateBegin,
// 					polSubDateEnd:polSubDateEnd,
					
				},
				success:function(page){
					$.closeLoading();
					if($.validate(page))return;
					if(page.result == 'noChannelInfo'){
						//清空表格数据
						$("#lifePolicyTable").find("tbody").remove();
						$("#lifePolicyPageDiv").html("");
// 						$("#countValidPolicy").text("0");
// 						$("#totalPremium").text("0");
// 						$("#countOfCancel").text("0");
// 						$("#totalPremiumOfCancel").text("0");
						
						if(downloadFlag){
							$.message("error", "导出数据为空");
						}
						return;
					}

// 					$("#countValidPolicy").text(page.map.countOfValid);//有效保单笔数
// 					$("#totalPremium").text(page.map.totalPremiumOfValid);//设置保费合计
// 					$("#countOfCancel").text(page.map.countOfCancel);//注销保单笔数
// 					$("#totalPremiumOfCancel").text(page.map.totalPremiumOfCancel);//设置注销保费合计
																																
					//业务处理	
					var lastbutton = "<a href='javascript:void(0)' onClick='updateSet(this);return false'>[编辑]</a>";
					var fieldNames="polno,plan_name,cond1,premium,appdate,begin_date,end_date,rcv_prem_status,rcv_prem_date";
					var tableContent = creatTable1(fieldNames,page,null,lastbutton);																			
					var tableObj = $("#lifePolicyTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					
						
					var strPage = creatChannelPage(pageIndex,6,page.maxPage,"27");
					var pageDIV = $("#lifePolicyPageDiv");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage); 
					
					if(downloadFlag){
						if(page.data.length == 0){
							$.message("error", "导出数据为空");
							return;
						}
						
						$("#downloadlifePolicyFileForm").attr("action","<%=path%>/protocolPolicyList/downloadProtocolPolicyFileByCriteria");
					 	$("#downloadlifePolicyFileForm").submit();
					 	
					}
					bindredio();
				}
			});
		}
	
	

	//点击文件下载
	function downloadlifePolicyFile(){
		queryLifePolicy(-1);
	}

	//弹出层表格绑定单选按钮事件，选中某个单选按钮，该按钮所在行高亮显示
	function bindradio(){
		$("input[name='prodradio']").click(function(){
			$("input[name='prodradio']").parent().parent().removeClass("table_highlighter");
			$(this).parent().parent().addClass("table_highlighter");
	   	});
		$("input[name='partnerradio']").click(function(){
			$("input[name='partnerradio']").parent().parent().removeClass("table_highlighter");
			$(this).parent().parent().addClass("table_highlighter");
	   	});
		$("input[name='deptradio']").click(function(){
			$("input[name='deptradio']").parent().parent().removeClass("table_highlighter");
			$(this).parent().parent().addClass("table_highlighter");
	   	});
	}

	//统一 关闭窗口(传入要关闭DIV的id)
	function closeCurrentDIV(obj){
			$("#"+obj).CloseDiv();	
	}
	
	//点击"编辑"触发事件
	function updateSet(obj){
		var upTr = $(obj).parent('td').parent('tr')[0];
		var polno = upTr.childNodes[0].innerHTML;
		$.openLoading();
		$.ajax({
			url:"<%=path%>/protocolPolicyList/queryProtocolById",
			type:'POST',
			dataType:'json',
			data:{polno:polno},
			success:function(data){
				$.closeLoading();
				$("#pro_polno").val(data.POLNO);
				$("#pro_rcv_prem_status option[value='"+data.NUM_RCV_PREM_STATUS+"']").attr("selected",true);
				
				if(data.NUM_RCV_PREM_STATUS !="1"){
					$("#pro_rcv_prem_date").val('');
					$("#pro_rcv_prem_date").attr("disabled",true);
					$("#pro_rcv_prem_date").css({"background-color":"#ccc"});
				}else{
					$("#pro_rcv_prem_date").val(data.RCV_PREM_DATE);
					$("#pro_rcv_prem_date").attr("disabled",false);
					$("#pro_rcv_prem_date").css({"background-color":"#FFFFFF"});
				}
				$("#bianjiProtocolDIV").OpenDiv();
				
			}
		});
	}
	
	//当状态改变时 触发事件
	function dateStus(){
		var rcv_prem_status=$.trim($("#pro_rcv_prem_status").val());
		if(rcv_prem_status =="0"){
			$("#pro_rcv_prem_date").val('');
			$("#pro_rcv_prem_date").attr("disabled",true);
			$("#pro_rcv_prem_date").css({"background-color":"#ccc"});
		}else{
			$("#pro_rcv_prem_date").attr("disabled",false);
			$("#pro_rcv_prem_date").css({"background-color":"#FFFFFF"});
		}
	}
	
	//编辑显示页面后  点击保存触发事件
	function saveUpProtocol(){
		var polno=$.trim($("#pro_polno").val());
		var rcv_prem_status=$.trim($("#pro_rcv_prem_status").val());
		var rcv_prem_date=$.trim($("#pro_rcv_prem_date").val());
		if(rcv_prem_status =="1"){
			if(rcv_prem_date ==''){
				$.message("error","请填写收款日期");
				return;
			}
		}
		$.openLoading();
		$.ajax({
			url:"<%=path%>/protocolPolicyList/saveUpProtocol",
			type:'POST',
			async :false,
			dataType:'json',
			data:{
				polno:polno,
				rcv_prem_status:rcv_prem_status,
				rcv_prem_date:rcv_prem_date
			},
			success:function(data){
				$.closeLoading();
				if("success"==data.result && ""!= data.message){
					closeCurrentDIV("bianjiProtocolDIV");
					queryLifePolicy();
				}else if("error"==data.result && ""!= data.message){
					$.message("error", data.message);
				}				
			}
			
		});
	}
	
	//点击批量更新模板下载触发事件
	function teamBBRDownLoad(){
		window.location.href='<%=path%>/protocolPolicyList/teamBBRDownLoad';
	}
	
	//点击批量更新实收状态触发事件
	function polNoDetailInfo(){
		$("#protocolReconciliationDiv").css({"width":"50%","height":"30%"});
		$("#chooseReconciliationFileForm").css("display","block");
		$("#protocolReconciliationDiv").OpenDiv();
	}
	
	//关闭批量更新Div
	function closeProtocolReconciliationDiv(){
		$("#protocolReconciliationDiv").CloseDiv();
	}
	
	//批量更新时 点击更新 触发事件
	function reconciliationFileChose(){
		var reconciliationFile=$("#reconciliationFile").val();
		if(reconciliationFile.length == 0){
			$.message("error","请先选择更新文件");
			return;
		}
		
		if(reconciliationFile.substr(reconciliationFile.lastIndexOf(".")) != ".xls"){
			$.message("error", "必须选择xls格式的对账文件");
			return;
		}
		$.ajaxFileUpload({
		    url:'<%=path%>/protocolPolicyList/protocolReconciliation',
		    fileElementId :'reconciliationFile',//file控件id
		    dataType: 'json',
		    success : function (data){
		    	if(data.result=="error"||data.result=="fail"){
		        	$.dialog({
		    			width: 358,
		    			top:40,
		    			modal:true,
		    			Close:true,
		    			cancel:null,
		    			content: data.message
		    		});
		        	return;
		      }
		    	
		    	if(data.result=="success"){
		        	$.dialog({
		    			width: 358,
		    			top:40,
		    			modal:true,
		    			Close:false,
		    			ok:'关闭',
		    			cancel:null,
		    			content: data.message
		    		});
                 }
		    	
		    	$("#protocolReconciliationDiv").CloseDiv();
		    	queryLifePolicy();
		    }
		    
		});			
	     
	}
	
 
	
	</script>
	
	</head>
	<body>
	<form method="POST" name="form2">
	<input type="hidden" name="polNo" id="downLoadPolNoStr">
	</form>
 	 <div class="current">
           <table class="current_table_1">
             <tbody>
              	<tr class="f2">
	                <td><img src="./images/current_1.jpg"></td>
	                <td class="current_table_1_td">
	                  <img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
	                  <span style=" color:#136bab; ">统计分析
	                  	<span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>车捷保保单查询
	                  </span>
                  	</td>
                 	<td><img src="./images/current_3.jpg"></td>
              	</tr>
           	 </tbody>
           </table>
     </div>
       
       <!--查询条件及结果表单 -->
        <table border="1" class="table_02" style="height:150px">
	  		<tr height="50px">
	  			<td colspan="2" align="center">
	  				<form method="post" id="downloadlifePolicyFileForm"> 
						<table border="0" style="margin: 12px auto;">
							<tr>
								<td style="padding-left:40px; border: 0;text-align: right" nowrap="nowrap">机构：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
								   <select class="search_select_1" name="privilegeBranch" id="privilegeBranch" onchange="clearBranchRelaField()" style="width: 130px"></select>
								</td>
								
								<td style="padding-left:40px;border: 0;text-align: right" nowrap="nowrap">出单机构：</td>
		                  		<td style="border: 0;text-align: left;padding-right: 70px">
		                  			<input id="dptCode" name="dptCde" type="text" readonly="readonly" style=" background-color: #ccc;" class="input_text">&nbsp;&nbsp;
		                  			<input type="button"  class="input_button_5" id="searchDeptBtn" value="请选择" onClick="openDeptDiv(1,this)"/>
		                  		</td>
								
								<td style="border: 0;text-align: right;" nowrap="nowrap">产品：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									<select class="search_select_1" name="tradProdType" id="tradProdType">
										<option value="">---请选择---</option>
										<option value="043T">043T-车捷保</option>								   		
								   </select>
								</td>
							</tr>
							<tr>
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单号：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									<input name="polno" id="polno" class="input_text" style="width:130px;" size="25"/>
								</td>
								
								<td style="border: 0;text-align: right" nowrap="nowrap">合作伙伴：</td>
		                        <td style="border: 0 ;text-align: left; padding-right: 70px">
		                        	<input name="partnerNo" id="partnerNo" readonly="readonly" onselect="" style=" background-color: #ccc;" class="input_text">&nbsp;&nbsp;
		                        	<input type="button"  class="input_button_5"  id="searchPartnerBtn" value="请选择" onClick="openChannelInfoDiv(1,this)"/>
		                        </td>
		                        
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单状态：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
								   <select class="search_select_1" name="stateId" id="polStatus">
								   		<option value="">---请选择---</option>
								   		<option value="0">承保</option>
								   		<option value="1">已实收</option>
								   </select>
								</td>
							</tr>
							<tr>
								<td style="border: 0;text-align: right;" nowrap="nowrap">被保险人名称：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									<input name="bbrName" id="bbrName" class="input_text" style="width:130px;" size="25"/>
								</td>
								
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单生效日期：</td>
								<td colspan="3" style="border: 0;text-align: left;padding-right: 70px">
									 <input id="polBeginDateBegin" name="polBeginDateBegin" readonly="readonly" onclick="showCalendar('polBeginDateBegin','y-mm-dd');"  class="input_time"/>&nbsp;至
									<input id="polBeginDateEnd" name="polBeginDateEnd" readonly="readonly" onclick="showCalendar('polBeginDateEnd','y-mm-dd');"  class="input_time"/>
								</td>
							</tr>
							<tr>
								<td colspan="6" style="border: 0;padding-top: 5px;padding-right: 70px">
									<input type="button"  class="input_button_1"  value="查询"    onClick="queryLifePolicy()"/>
								   	<input type="button"  class="input_button_1"  value="重置"    onClick="resetCriteria()"/>
								</td>
							</tr>
						</table>	  				
				    </form>
				</td>
	  		</tr>
	  		<tr>
	  			<td valign="top">
		  			<div id="lifePolicyDiv" style="width:98%;margin:5px" >
		  				<div align="left" style="margin:15px">
			  				<input type="button"  class="input_button_2"  value="导出Excel" onClick="downloadlifePolicyFile()"/>&nbsp;
			  				<input type="button"  class="input_button_2"  style="width:120px;" value="批量更新实收状态" onClick="polNoDetailInfo()"/>&nbsp;
			  				<input type="button"  class="input_button_2" style="width:120px;" value="批量更新模板下载" onClick="teamBBRDownLoad()"/>&nbsp;
<!-- 							<div align="right" style="margin:15px"> -->
<!-- 								<span>有效保单笔数：</span><span id="countValidPolicy" style="color: red">0</span>笔&nbsp;&nbsp; -->
<!-- 								<span>含税保费合计：</span><span id="totalPremium" style="color: red">0</span>元&nbsp;&nbsp; -->
<!-- 								<span>注销保单笔数：</span><span id="countOfCancel" style="color: red">0</span>笔&nbsp;&nbsp; -->
<!-- 								<span>注销含税保费合计：</span><span id="totalPremiumOfCancel" style="color: red">0</span>元 -->
<!-- 							</div> -->
				  		</div>
				  		<table class="table_02" id="lifePolicyTable">
					  		<thead>
				               <tr>
				                  <th style="width:12%" nowrap="nowrap">保单号</th>
				                  <th style="width:29%" nowrap="nowrap">投保方案</th>
				                  <th style="width:5%" nowrap="nowrap">被保人姓名</th>
				                  <th style="width:5%" nowrap="nowrap">含税保费</th>
				                  <th style="width:6%" nowrap="nowrap">保单提交日期</th>
				                  <th style="width:6%" nowrap="nowrap">起保日期</th>
				                  <th style="width:6%" nowrap="nowrap">终保日期</th>
				                  <th style="width:6%" nowrap="nowrap">状态</th>
				                  <th style="width:6%" nowrap="nowrap">收款日期</th>
				                  <th style="width:5%" nowrap="nowrap">操作</th>
				              	</tr>
				              </thead>
			              <tbody>
						  </tbody>
			            </table>
		  				 <div id="lifePolicyPageDiv"  class="page"></div>
		  			</div>
	  			</td>
	  		</tr>
	  	</table>
       
    <!--选择出单机构 DIV 默认隐藏-->
	<div id="deptDiv" style="display:none;width:80%;">
		<div class="table_title_div">
			<table class="table_title" style='width:100%;height: 20px;'>
				<tr>
				<td width="10%"></td>
				<td width="80%" id="interfaceName"></td>
				<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('deptDiv')"/></td>
				</tr>
			</table>
		</div>
		<table class="table_02" id="table" style="height:180px;" align="center">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">
							 出单机构代码：<input name="txt3"  id="deptCode"  type="text" class="input_text" value="" >&nbsp;&nbsp;
							 出单机构名称：<input name="txt3" id="deptCname"  type="text" class="input_text" value="">
								       <input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryCoreDept(1)"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="deptTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:5%">选择</th>
			                  <th style="width:40%">出单机构代码</th>
			                  <th style="width:55%">出单机构名称</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="deptPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center" >
		  <input type="button" id="saveRoleBtn" value="确定" onclick="chooseDept()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		  <input type="button" value="取消" onclick="closeCurrentDIV('deptDiv')" class="input_button_3"/>
		</div>
	</div>
       
    <!--选择 合作伙伴 div 默认隐藏-->
  	<div id="channelInfoDiv" style="display:none;width:80%;">
		<div class="table_title_div">
			<table class="table_title" style='width:100%;height: 20px;'>
				<tr>
				<td width="10%"></td>
				<td width="80%" id="interfaceName"></td>
				<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('channelInfoDiv')"/></td>
				</tr>
			</table>
		</div>
		<table class="table_02" id="table" style="height:180px;" align="center">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">
							 合作伙伴代码：<input name="txt3"  id="channelCode"  type="text" class="input_text" value="" >&nbsp;&nbsp;
							 合作伙伴名称：<input name="txt3" id="channelName"  type="text" class="input_text" value="">&nbsp;&nbsp;
								       <input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryTradPartners(1)"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="channelInfoTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:5%">选择</th>
			                  <th style="width:10%">合作伙伴代码</th>
			                  <th style="width:20%">合作伙伴名称</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="channelInfoPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center" >
		  <input type="button" id="saveRoleBtn" value="确定" onclick="choosePartner()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		  <input type="button" value="取消" onclick="closeCurrentDIV('channelInfoDiv')" class="input_button_3"/>
		</div>
	</div>
<!-- 点击编辑弹出窗口Div 默认隐藏-->
	<div id="bianjiProtocolDIV" style="display:none;width:50%;height:40%">
		<div class="table_title_div">
			<table class="table_title" style='width:100%;height:20px;'>
				<tr>
				<td width="10%"></td>
				<td width="80%" id="interfaceName"></td>
				<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('bianjiProtocolDIV')"/></td>
				</tr>
			</table>
		</div>
		<table border="0" class="content_table_1" width="100%" height="100%">
			<tr class="f1">
				<td style="width:10%;text-align:right" >保单号：</td>
				<td style="width:10%;text-align:left">
					<input name="txt3"  id="pro_polno"  type="text" class="input_text" value="" style="width:180px;border:none;background-color:#f6f7f9;" readonly="true"/>
				</td>
			</tr>
			<tr class="f1">
				<td style="width:10%;text-align:right">保单状态：</td>
				<td style="width:10%;text-align:left">
					<select class="search_select_1" onchange="dateStus()" name="stateId" id="pro_rcv_prem_status" style="width:130px">
				   		<option value="0">承保</option>
				   		<option value="1">已实收</option>
					</select>
				</td>
			</tr>
			<tr class="f1">
				<td style="width:10%;text-align:right">收款日期：</td>
				<td style="width:10%;text-align:left">
					<input id="pro_rcv_prem_date" onkeydown="false" onclick="showCalendar('pro_rcv_prem_date','y-mm-dd');$('.calendars').css('z-index',20000);" class="input_time" readonly="readonly" style="width:130px;"/>
				</td>
			</tr>
			<tr class="f1">
				<td style="width:10%;" colspan="2">
					<input type="button" id="saveProtocol" value="保存" onclick="saveUpProtocol()" class="input_button_3"/>
					<input type="button" id="saveProtocol" value="关闭" onclick="closeCurrentDIV('bianjiProtocolDIV')" class="input_button_3"/>
				</td>
			</tr>
		</table>
	</div>
<!-- 	批量更新实收状态 Div -->
        <div id="protocolReconciliationDiv"  style="display:none;width:50%;height: 30%;background-color:#f6f7f9;">
        	<div class="table_title_div"">
				<table class="table_title" style="width:100% ;height: 20px;">
					<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeProtocolReconciliationDiv()"/></td>
					</tr>
				</table>
			</div>
			
	   		<form id="chooseReconciliationFileForm" action="" method="POST" enctype="multipart/form-data" >
	     		<table class="table_02" style="width: 92%" align="center">
	     			<tr>
	     				<td style="padding:25px 20px ">
	     					请选择批量更新文件：<input type="file" id="reconciliationFile" name="reconciliationFile"/>
	        				<input type="button" class="input_button_1" value="更新" onClick="reconciliationFileChose()"/>
	     				</td>
	     			</tr>
	     		</table>
	     	</form>
        </div>
	<iframe  id="chooseForm" style="display: none;"></iframe>
	</body>
</html>